import request from '@/utils/request'
import type { ArticleQA } from '@/api/types'

// 分析文章
export function analyzeArticle(articleId: number) {
  return request.post<void>(`/api/articles/analysis/${articleId}`)
}

// 生成文章问答
export function generateArticleQA(articleId: number) {
  return request.post<ArticleQA[]>(`/api/articles/analysis/${articleId}/qa`)
    .then(response => response.data)
}

// 获取文章问答列表
export function getArticleQAList(articleId: number) {
  return request.get<ArticleQA[]>(`/api/articles/analysis/${articleId}/qa`)
    .then(response => response.data)
} 